package eerbaar.v2.pattern.client.internal.teach;

public class TeachingCommand {

    private final TeachingCommandBody body;

    public TeachingCommand() {
        this.body = new TeachingCommandBody();
    }

    public void execute() {

        if (this.body.isTeaching()) {

            this.body.stopTeaching();
        } else {

            this.body.startTeaching();
        }

    }

    public TeachingCommandBody getBody() {
        return this.body;
    }

    public boolean isTeaching() {

        return this.body.isTeaching();
    }

}
